package org.example.mapper;

import org.apache.ibatis.annotations.Param;
import org.example.ourEnum.AnnouncementStatus;
import org.example.pojo.domain.Announcement;

import java.util.List;

public interface AnnouncementMapper {
    void insert(Announcement announcement);
    Announcement selectById(Integer id);
    List<Announcement> selectAll();
    List<Announcement> getPublished();
    void update(Announcement announcement);
    void delete(Integer id);
    void changeStatusById(@Param("id") Integer id, @Param("status") AnnouncementStatus status);
    /** 根据状态查询公告列表 */
    List<Announcement> findByStatus(@Param("status") String status);
}
